[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 findnext()              Fetch Files That Match findfirst()

 #include   <dir.h>

 int           findnext(ffblk);
 struct ffblk  *findnext;

    findnext() is used to fetch subsequent files that match the
    'pathname' specified in findfirst().  'ffblk' still contains all the
    necessary information about the file for continuing the search. One
    file name for each call to findnext() will be returned until no more
    matching files are found in the directory. The format of the
    structure 'ffblk' is as follows:

          struct ffblk  {
               char ff_reserved[21];         /* Reserved by DOS */
               char ff_attrib;                    /* Attribute found */
               int ff_ftime;                 /* File time */
               int ff_fdate;                 /* File date */
               long ff_fsize;                /* File size */
               char ff_name[13];             /* Found file name */
          };

       Returns:     0 is returned if a file matching 'pathname' is found.
                    On error, or if no more files are found, -1 is
                    returned and 'errno' (defined in <errno.h>) is set to
                    either ENOENT (Path or file name not found) or
                    ENMFILE   (No more files).


   Portability:     MS-DOS only.


See Also: findfirst()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson